<%@page import="QRCG.deneme"%>
<%@page import="java.util.*"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Change Personal Information !!!</title>
<link href="css/index.css" rel="stylesheet" type="text/css" />

<script src="datetimepicker_css.js"></script>

<style type="text/css">
body {
	background-image: url(images/bgNew.png);
	background-repeat: repeat;
	font-size: 80%;
	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
}

H2 {
	COLOR: black;
	FONT-FAMILY: 'Times New Roman';
	TEXT-TRANSFORM: capitalize;
	font-size: 30px;
}
</style>
</head>


</head>
<body>

	<%
		String nickname = (String) session.getAttribute("nickname");
	    session.setAttribute("nickname",nickname);


		deneme conn = new deneme();
		conn.connect();

		String name = conn.get_Name(nickname);
		String surname = conn.get_surname(nickname);
		String gender   = conn.get_gender(nickname);
		String email    = conn.get_email(nickname);
		String birthday = conn.get_birthday(nickname);
		String location = conn.get_location(nickname);



		ArrayList<HashMap<String, Object>> LocList = conn
				.get_all_locations();
		int num_of_loc = LocList.size();
		System.out.println(num_of_loc);
	%>


	<form name="ChangePersInfo" method="post" action="ChangePersInfoServe">

		<center>

			<table width="1100" border="0" cellpadding="1" bgcolor=white>
				<tr>
					<td>
						<!-- TABLE logo and head -->
						<table width="1100" border="0" cellpadding="1" bgcolor=white>
							<tr>
								<td width="250" align="center"><img src="images/logo.png"
									width="130" height="130" /></td>
								<td align="left"><h2>QR-MARKS-THE-SPOT!</h2></td>

							</tr>

						</table> <!-- LINK TABLE -->


						<table width="1100" border="0" cellpadding="20" bgcolor="#D6E9F3">
							<tr>
								<td align="center"
									style="font: bold 16px tahoma; text-decoration: none; color: #00000; padding: 5px;">
									You can now change your personal information here</td>

							</tr>
						</table> <br> <br> <br>

						<table width="1100" border="0" cellpadding="1" bgcolor=white>


							<tr>

								<td align="left"><b>Name</b></td>
								<td><input type="text" name="name" value=<%=name %> /></td>
							</tr>
							<tr>

								<td align="left"><b>Surname</b></td>
								<td><input type="text" name="surname" value=<%=surname %> /></td>
							</tr>
							<tr>

								<td align="left"><b>e-mail</b></td>
								<td><input type="text" name="email" value=<%=email %>/></td>
							</tr>

							<tr>
								<td align="left"><b>Birthday</b></td>
								<td><input type="text" name="birthday" id="f1"
									maxlength="10" value=<%=birthday%> /> <img src="images/cal.gif" alt=""
									onclick="javascript:NewCssCal('f1','yyyyMMdd')"
									style="cursor: pointer" /></td>
							</tr>

							<tr>

								<td align="left"><b>Gender</b></td>
								<td align="left" width="10%"><input type="radio"
									name="gender" value="female">Female</td>
								<td align="left" width="30%"><input type="radio"
									name="gender" value="male" checked>Male</td>

							</tr>

							<tr>

								<td align="left"><b>Location</b></td>
								<td><SELECT name=Loc>
										<OPTION><%=location %></OPTION>
										<%
											for (int i = 0; i < num_of_loc; i++) {
												HashMap<String, Object> map = (HashMap<String, Object>) LocList
														.get(i);
										%>

										<OPTION><%=map.get("location_name")%></OPTION>
										<%
											}
										%>
								</SELECT></td>
							</tr>

							<tr>

								<td align="left"><b> Change Password</b></td>
								<td><input type="password" name="pass1" /></td>
							</tr>

							<tr>

								<td align="left"><b>Verify Password</b></td>
								<td><input type="password" name="pass2" /></td>
							</tr>
							<tr>
								<td align="right"><input type="submit" value="Submit" /></td>


							</tr>




						</table>

					</td>


				</tr>


			</table>



		</center>

	</form>

</body>
</html>